function img=fourier_cut(img,mode,orientation)
%transormation into fourier space, cutting with fourier_mask 'mode',
%backtransformation
%
%
%autho: Sebastian Schmelcher version: 2012-03-20

if(exist('orientation'))
    img=abs(ifft2(ifftshift(get_fourier_mask(mode,size(img),orientation).*fftshift(fft2(img)))));
else
    img=abs(ifft2(ifftshift(get_fourier_mask(mode,size(img)).*fftshift(fft2(img)))));    
end